//
//  MTPartyTaskModel.swift
//  MT
//
//  Created by ooops on 2020/5/24.
//  Copyright © 2020 张强. All rights reserved.
//

import Foundation
import ObjectMapper
import MTCategory

enum MTPartyTaskType: Int {
    case `default` = 0
    /// 线上打卡 - 商
    case online_b = 1
    /// 线下打卡 - 商
    case offline_b = 2
    /// 聚会party
    case party = 3
    /// 下午茶
    case tea = 4
    /// 聚会饭局
    case launch = 5
    /// 聚会旅行
    case travel = 6
    
}

class MTPartyTaskModel: Mappable {
    
    /// 请求是否成功的code
    var code: Int?
    /// 请求返回的Message
    var message: String?
    /// 分页对象
    var page: PageModel?
    /// 时间戳
    var timestamp: TimeInterval?
    
    var result: [MTPartyTaskInfoModel]?
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        code    <- map["code"]
        message <- map["message"]
        page <- map["page"]
        timestamp <- map["timestamp"]
        result  <- map["result"]
    }
}

class MTPartyTaskInfoModel: Mappable {
    /// 图片
    var href: String?
    ///
    var id: Int = 0
    // 主题类型 1线上打卡(商) 2线下打卡(商) 3聚会party 4下午茶 5聚会饭局 6聚会旅行
    var type: MTPartyTaskType = .default
    // 主题名称
    var typeName: String?
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        href    <- map["href"]
        id <- map["id"]
        type <- map["type"]
        typeName <- map["typeName"]
    }
}

